<template>
    <div class="proRight">
        <TabNav @transferTab="getCmponentName" :subNav="subnav"></TabNav>
        <div class="tableInfor">
            <div :is="item.components" v-show="index==Stroke_current_seclected"  :text="item.text" :key="item.id" :proid="item.dataId" :proSn="item.dataSn" v-for="(item,index) in tabList" :subNav="subnav"></div>
        </div>
    </div>
</template>
<script>

    import TabNav from '@/components/public/tabNav'
    import StrokeProDefault from '@/components/stroke/stroke_pro_default'
    import StrokeProMap from '@/components/stroke/stroke_pro_map'
    import StrokeProNew from '@/components/stroke/stroke_pro_new'
    import StrokeProEdit from '@/components/stroke/stroke_pro_edit'
    import StrokeProMembers from '@/components/stroke/stroke_pro_members'
    import StrokeProMembersNew from '@/components/stroke/stroke_pro_members_new'
    import StrokeProMembersEdit from '@/components/stroke/stroke_pro_members_edit'
    import strokeProSchedule from '@/components/stroke/stroke_pro_schedule'
    import strokeProNoticeOutgroup from '@/components/stroke/stroke_pro_notice_outgroup'
    import strokeProNoticeAnnounce from '@/components/stroke/stroke_pro_notice_announce'
    import StrokeProCopy from '@/components/stroke/stroke_pro_copy'
    import {MP} from '@/assets/js/map.js'

    export default {
        data(){
            return {
                item:'行程管理',
                tabList:'',
                componentName:'StrokeProDefault',
            }
        },
        props:['subnav'],
        computed:{
            Stroke_tabList(){//tab 列表
                return this.$store.state.stroke.tabList;
            },
            Stroke_current_seclected(){//
                return this.$store.state.stroke.curSeclected
            }
        },
        methods:{
            getCmponentName(item,num){
                this.componentName = item;
            }
        },
        mounted(){
            var self = this;
            self.tabList = self.Stroke_tabList;
            MP();//插入百度地图的js
        },
        components:{
            TabNav,
            StrokeProDefault,
            StrokeProMap,
            StrokeProNew,//新建行程
            StrokeProMembers,//成员名单
            StrokeProMembersNew,//新建成员
            strokeProSchedule,//日程安排
            strokeProNoticeOutgroup,//出团通知
            strokeProNoticeAnnounce,//公告通知
            StrokeProMembersEdit,
            StrokeProEdit,
            StrokeProCopy,//复制行程
        }
    }
</script>
